package com.sg.service.biz.component.nb;

import com.sg.dto.biz.component.req.CalculateContentAmountReqDto;
import com.sg.dto.biz.component.res.CalculateContentAmountRespDto;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

/**
 * @author ： 手工接入方法
 * @version 1.0
 * @since 2022/5/28 15:32
 */
@Service
public class NbStatisticalData {
    /**
     * code:getDataCount
     * name:M2计算内容条数(特殊方法）
     * desc:undefined
     * gen by moon at 8/28/2022, 4:03:04 PM
     **/
    @Trace(operationName = "M2计算内容条数(特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CalculateContentAmountRespDto calculateContentAmount(CalculateContentAmountReqDto reqDto) {
        CalculateContentAmountRespDto retData = new CalculateContentAmountRespDto();
        if (reqDto.getContentAmountList() == null || reqDto.getContentAmountList().size() == 0) {
            retData.setCalcCount(0L);
            return retData;
        }
        retData.setCalcCount(Long.valueOf(reqDto.getContentAmountList().size()));
        return retData;
    }
    //手工接入方法
}
